package com.caseProject.puremvc.mediator.view
{
	import com.caseProject.puremvc.mediator.gui.AbstractDiagramMenu;
	
	import flash.events.Event;
	
	public class MenuIdleToolsView extends AbstractDiagramMenu
	{
		private var view:MenuIdleSWC;
		
		public function MenuIdleToolsView()
		{
			super();
			this.view = new MenuIdleSWC();
			this.addChild(this.view);
			
			this.addEventListener(Event.ADDED_TO_STAGE, onInit);
		}
		
		protected function onInit(event:Event):void
		{
			
			this.stage.addEventListener (Event.RESIZE, onResize);
			this.view.fundo.width = this.stage.stageWidth - this.view.x;
		}
		
		protected function onResize(event:Event):void
		{
			if (this.stage != null)
			{
				this.view.fundo.width = this.stage.stageWidth - this.view.x;
			}
		}
	}
}